/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.rcs.folders;

import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author pablo
 */
public class WrapperItem implements VirtualItem {

  private VirtualItem item;
  private String name ;
  
  public WrapperItem(VirtualItem item, String name) {
    this.item = item;
    this.name = name ;
  }

  public VirtualItem getItem() {
    return item ;
  }
  
  @Override
  public String getName() {
    return item.getName() ;
  }

  @Override
  public String getDisplayName() {
    return name ;
  }

  @Override
  public Date getModifiedDate() {
    return item.getModifiedDate();
  }

  @Override
  public Date getExpiresDate() {
    return item.getExpiresDate();
  }

  @Override
  public String getETag() {
    return item.getETag();
  }

  @Override
  public long getContentLength() {
    return item.getContentLength();
  }

  @Override
  public String getContentType() {
    return item.getContentType();
  }

  @Override
  public void sendContent(HttpServletResponse response, HttpServletRequest request, String requestedPath, boolean onlyHeader) throws Exception {
    item.sendContent(response, request, requestedPath, onlyHeader);
  }
}
